3.7 \(\int \csc ^3(x) (a \cos (x)+b \sin (x)) \, dx\)

Optimal. Leaf size=15 \[ -\frac {1}{2} a \csc ^2(x)-b \cot (x) \]

[Out]

-b*cot(x)-1/2*a*csc(x)^2

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3089, 3767, 8, 2606, 30} \[ -\frac {1}{2} a \csc ^2(x)-b \cot (x) \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^3*(a*Cos[x] + b*Sin[x]),x]

[Out]

-(b*Cot[x]) - (a*Csc[x]^2)/2

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 3089

Int[sin[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Sym
bol] :> Int[ExpandTrig[sin[c + d*x]^m*(a*cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] &&
 IntegerQ[m] && IGtQ[n, 0]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \csc ^3(x) (a \cos (x)+b \sin (x)) \, dx &=\int \left (b \csc ^2(x)+a \cot (x) \csc ^2(x)\right ) \, dx\\ &=a \int \cot (x) \csc ^2(x) \, dx+b \int \csc ^2(x) \, dx\\ &=-(a \operatorname {Subst}(\int x \, dx,x,\csc (x)))-b \operatorname {Subst}(\int 1 \, dx,x,\cot (x))\\ &=-b \cot (x)-\frac {1}{2} a \csc ^2(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 15, normalized size = 1.00 \[ -\frac {1}{2} a \csc ^2(x)-b \cot (x) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^3*(a*Cos[x] + b*Sin[x]),x]

[Out]

-(b*Cot[x]) - (a*Csc[x]^2)/2

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 19, normalized size = 1.27 \[ \frac {2 \, b \cos \relax (x) \sin \relax (x) + a}{2 \, {\left (\cos \relax (x)^{2} - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3*(a*cos(x)+b*sin(x)),x, algorithm="fricas")

[Out]

1/2*(2*b*cos(x)*sin(x) + a)/(cos(x)^2 - 1)

________________________________________________________________________________________

giac [A]  time = 0.23, size = 13, normalized size = 0.87 \[ -\frac {2 \, b \tan \relax (x) + a}{2 \, \tan \relax (x)^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3*(a*cos(x)+b*sin(x)),x, algorithm="giac")

[Out]

-1/2*(2*b*tan(x) + a)/tan(x)^2

________________________________________________________________________________________

maple [A]  time = 0.82, size = 14, normalized size = 0.93 \[ -\frac {a}{2 \sin \relax (x )^{2}}-b \cot \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^3*(a*cos(x)+b*sin(x)),x)

[Out]

-1/2*a/sin(x)^2-b*cot(x)

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 15, normalized size = 1.00 \[ -\frac {b}{\tan \relax (x)} - \frac {a}{2 \, \sin \relax (x)^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3*(a*cos(x)+b*sin(x)),x, algorithm="maxima")

[Out]

-b/tan(x) - 1/2*a/sin(x)^2

________________________________________________________________________________________

mupad [B]  time = 0.41, size = 14, normalized size = 0.93 \[ -\frac {a+b\,\sin \left (2\,x\right )}{2\,{\sin \relax (x)}^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*cos(x) + b*sin(x))/sin(x)^3,x)

[Out]

-(a + b*sin(2*x))/(2*sin(x)^2)

________________________________________________________________________________________

sympy [A]  time = 3.88, size = 17, normalized size = 1.13 \[ - \frac {a}{2 \sin ^{2}{\relax (x )}} - \frac {b \cos {\relax (x )}}{\sin {\relax (x )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**3*(a*cos(x)+b*sin(x)),x)

[Out]

-a/(2*sin(x)**2) - b*cos(x)/sin(x)

________________________________________________________________________________________